import {  Route, NavLink} from "react-router-dom";
import EventDemo from "./EventDemo";
import ClassDemo from "./ClassDemo";
import { Button, Flex } from 'antd';

const Layout = () => {
  return (
    <div>
      <header>
        {/* <nav> */}
        <Button type="primary">Primary Button</Button>
          {/* <ul>
            <li><Link to="/eventDemo">EventDemo</Link></li>
            <li><Link to="/classDemo">ClassDemo</Link></li>
          </ul>
        </nav> */}
      </header>
      <main>
        {/* <Outlet /> */}
      </main>
    </div>
  );
};

const RouterDemo = () => {
  return (
    <>
    {/* <BrowserRouter> */}
     <li><NavLink className="active" to="/eventDemo">EventDemo</NavLink></li>
     <li><NavLink to="/classDemo">ClassDemo</NavLink></li>
      
       {/* 注册路由 */}
       <Route path="/eventDemo" component={EventDemo} />
       <Route path="/classDemo" component={ClassDemo} />
    {/* </BrowserRouter> */}

   
    </>
  );
};

export default RouterDemo;
